import request from "@/utils/request";

// 获取列表
export function getAllList(query) {
    return request({
        url: "/infAchievement/page",
        method: "get",
        params: query,
    });
}

// 新增
export function save(data) {
    return request({
        url: '/infAchievement/save',
        method: 'post',
        data
    })
}

// 查询信息
export function detail(id) {
    return request({
      url: `/infAchievement/findById?id=` + id,
      method: "get",
    });
}

// 编辑
export function update(data) {
    return request({
        url: '/infAchievement/update',
        method: 'post',
        data:data
    })
}

// 删除
export function delData(id) {
    return request({
        url: `/infAchievement/delete/${id}`,
        method: 'post'
    })
}

// 发布
export function releaseData(data) {
    return request({
        url: `/infAchievement/recallOrPublish`,
        method: 'post',
        data:data
    })
}

// 撤回
export function withdrawData(data) {
    return request({
        url: `/infAchievement/recallOrPublish`,
        method: 'post',
        data:data
    })
}

// 查询关键词信息
export function detailKey(id) {
    return request({
      url: `/infAchievement/getkeywordManageData?id=` + id,
      method: "get",
    });
}

// 保存关键词
export function saveKey(data) {
    return request({
        url: '/infAchievement/keywordUpdate',
        method: 'post',
        data:data
    })
}